﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xilium.CefGlue;
using Xilium.CefGlue.Wrapper;

namespace IanWebkitBrowser
{
    public class RenderProcessHandler : CefRenderProcessHandler
    {
        private CefV8Handler testHandler;
        private CefV8Handler processControllerHandler;

        public RenderProcessHandler()
        {
            testHandler = new TestV8Handler();
            processControllerHandler = new ProcessControllerV8Handler();
        }

        protected override void OnWebKitInitialized()
        {
            CefRuntime.RegisterExtension("testHandler", ScriptCode.TestHandlerCode, testHandler);
            CefRuntime.RegisterExtension("processControllerHandler", ScriptCode.ProcessControllerHandlerCode, processControllerHandler);
            base.OnWebKitInitialized();
        }
    }
}
